Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of #13219 and #13220 to the staging branch #13233

Merged
merged 2 commits into from
Mar 19, 2022

Conversation

usaleem-ix
Copy link
Contributor

@usaleem-ix usaleem-ix commented Mar 18, 2022

Motivation and Context

Backport of #13219 and #13220 to the staging branch.

Description

b7cbb2f adds missing replay check to an assert in zfs_xvattr_set for FreeBSD.
0c27978 avoids taking a destroyed lock in zfs_event bits for FreeBSD.

How Has This Been Tested?

Manually applied. Pending result from a full CI run.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

mjguzik and others added 2 commits March 18, 2022 22:07
Reviewed-by: Ryan Moeller <freqlabs@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Closes openzfs#13219
At shutdown time, we drain all of the zevents and set the
ZEVENT_SHUTDOWN flag.  On FreeBSD, we may end up calling
zfs_zevent_destroy() after the zevent_lock has been destroyed while
the sysevent thread is winding down; we observe ESHUTDOWN, then back
out.

Events have already been drained, so just inline the kmem_free call in
sysevent_worker() to avoid the race, and document the assumption that
zfs_zevent_destroy doesn't do anything else useful at that point.

This fixes a panic that can occur at module unload time.

Reviewed-by: Ryan Moeller <freqlabs@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
Closes openzfs#13220
@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label Mar 18, 2022
@tonyhutter tonyhutter merged commit 4217506 into openzfs:zfs-2.1.4-staging Mar 19, 2022
@ghost ghost deleted the NAS-115362 branch March 19, 2022 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants